package io.summer.gadget.channel.core;

import io.summer.gadget.RedisFacade;
import lombok.extern.slf4j.Slf4j;

import java.util.List;

/**
 * @author Moonlight
 */
@Slf4j
public class TopicUtil extends AbstractServiceHelper {
  /**
   * 获取订阅了topic的服务
   *
   * @param topic 主题
   * @return 服务地址
   */
  public List<String> getSubscribedAppsForTopic(String topic) {
    return RedisFacade.hashFields(getTopicKey(topic));
  }
}
